package com.ruoyi.project.knowledge.service.impl;

import com.ruoyi.project.knowledge.domain.KnowledgeAttach;
import com.ruoyi.project.knowledge.mapper.KnowledgeAttachMapper;
import com.ruoyi.project.knowledge.service.IKnowledgeAttachService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class KnowledgeAttachServiceImpl implements IKnowledgeAttachService {
    @Autowired
    private KnowledgeAttachMapper attachMapper;

    @Override
    public List<KnowledgeAttach> selectAttachList(String knowledgeId) {
        return attachMapper.selectAttachByKnowledgeId(knowledgeId);
    }

    @Override
    public int deleteAttach(Long id) {
        return attachMapper.deleteKnowledgeAttach(id);
    }

    @Override
    public int deleteAttaches(String knowledgeId) {
        return attachMapper.deleteKnowledgeAttaches(knowledgeId);
    }
}
